import json
from dataclasses import dataclass

from py2neo import Graph


class Neo4jDriver:
    def __init__(self, url, username, password):
        self.graph = Graph(url, auth=(username, password))

    def run_cypher(self, query, parameters=None):
        return self.graph.run(query, parameters)


if __name__ == "__main__":
    driver = Neo4jDriver("bolt://localhost:7687", "neo4j", "12345678")
    res = driver.run_cypher("MATCH (n) RETURN n LIMIT 5")
    
    print(res.data)
    # driver.run_cypher("MATCH (n:Person) RETURN n LIMIT 25")
    # driver.run_cypher("MATCH (n:Person {name: 'Alice'}) RETURN n LIMIT 25")
    # driver.run_cypher("MATCH (n:Person {name: 'Alice'}) RETURN n LIMIT 25")
